#!/bin/bash
#mysql backup
#for tsf
bakDir=/var/database_backup/mysql_backup/
Date=`date +%Y%m%d%H%M`
BDate=`date -d -2day +%Y%m%d%H%M`
Passwd='root123456'
cd $bakDir
rm -rf 'backup_demo'$BDate.sql
/usr/bin/mysqldump -u root -p$Passwd  --databases backup_demo >'backup_demo'$Date.sql